added SSCLI 1.0
[windows-sources.git] / shared source / sscli20 / jscript / engine / callcontext.cs
blob55ca5aebd43b52abfbc8b6531b450d88ee969479
1 // ==++==
2 //
3 //
4 // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
5 //
6 // The use and distribution terms for this software are contained in the file
7 // named license.txt, which can be found in the root of this distribution.
8 // By using this software in any fashion, you are agreeing to be bound by the
9 // terms of this license.
10 //
11 // You must not remove this notice, or any other, from this software.
12 //
13 //
14 // ==--==
16 namespace Microsoft.JScript {
18 using System;
21 This class keeps the information around that is necessary to construct a trace of the call stack.
23 This class is only used by the Evaluator. When running IL it is too expensive and akward to create these things.
24 Instead, debugging information is emitted to the IL and used via the CLR debug API. (In the future, that is :-)
27 internal class CallContext{
28 internal readonly Context sourceContext; // The source context of the function call or eval expression.
29 private readonly LateBinding callee; //Null if eval.
30 private readonly Object[] actual_parameters;
33 internal CallContext(Context sourceContext, LateBinding callee, Object[] actual_parameters){
34 this.sourceContext = sourceContext;
35 this.callee = callee;
36 this.actual_parameters = actual_parameters;
39 internal String FunctionName(){
40 if (callee == null)
41 return "eval";
42 return callee.ToString();